//
//  ZYCompetitionSegment.h
//  BestLearning
//
//  Created by ちょうかんこん on 2017/12/19.
//  Copyright © 2017年 apple. All rights reserved.
//

#import <UIKit/UIKit.h>
@protocol ZYCompetitionSegmentDelegate <NSObject>
@optional
- (void)scrollToPage:(int)page;
@end
@interface ZYCompetitionSegment : UIView

@property (nonatomic, weak) id <ZYCompetitionSegmentDelegate> delegate;

@property(nonatomic, assign) CGFloat maxWidth;
@property(nonatomic,strong)NSMutableArray *titleList;
@property(nonatomic,strong)NSMutableArray *buttonList;
@property(nonatomic,weak)CALayer *LGLayer;
@property(nonatomic,assign)CGFloat bannerNowX;

+ (instancetype)initWithTitleList:(NSMutableArray *)titleList;
-(void)moveToOffsetX:(CGFloat)X;
@end
